/**
 * 
 */
package org.nanhill.osgi.example.manager.impl;

import org.nanhill.osgi.example.dao.UserDao;
import org.nanhill.osgi.example.manager.AccountNotExist;
import org.nanhill.osgi.example.manager.UserManager;

/**
 * @author lin.wangl
 * 
 */
public class UserManagerImpl implements UserManager {
	private UserDao userDao;

	public void setUserDao(UserDao userDao) {
		this.userDao = userDao;
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see org.nanhill.osgi.example.manager.UserManager#exist(java.lang.String,
	 *      java.lang.String)
	 */
	public void exist(String username, String password) throws AccountNotExist {
		if (!userDao.exist(username, password)) {
			throw new AccountNotExist();
		}

	}

}
